package com.wangshouyu.mp.message;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import com.thoughtworks.xstream.annotations.XStreamAlias;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author 王守钰
 * @date 2020年12月07日 11:08
 * @description 媒体消息
 */
public class MediaMessage implements Serializable {

    /**
     * 素材ID
     */
    @XStreamAlias(value = "MediaId")
    @SerializedName(value = "media_id")
    @JsonProperty(value = "media_id")
    @JSONField(name = "media_id")
    private String mediaId;

    public String getMediaId() {
        return mediaId;
    }

    public void setMediaId(String mediaId) {
        this.mediaId = mediaId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MediaMessage that = (MediaMessage) o;
        return Objects.equals(mediaId, that.mediaId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(mediaId);
    }

    public MediaMessage(String mediaId) {
        this.mediaId = mediaId;
    }

    public MediaMessage() {
    }
}
